package org.example.demo.apiv2.sql;

import lombok.extern.slf4j.Slf4j;
import net.sf.jsqlparser.expression.LongValue;
import net.sf.jsqlparser.statement.select.Limit;

@Slf4j
public class LimitParser {

    /**
     * 构造jsqlparser的Limit对象
     *
     * @param limitNumber
     * @return
     */
    public static Limit getLimit(Long limitNumber) {
        Limit limit = new Limit();
        limit.setRowCount(new LongValue(limitNumber));
        return limit;
    }

}
